package com.ct.gd.passport.view.widget;

import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.ct.gd.passport.R;

public class HeaderHelper {
	public static void setTitle(LayoutInflater inflater, CustomHeaderFragment fgHeader, CharSequence title) {
		DefaultHeaderViewFactory headerViewFactory = new DefaultHeaderViewFactory(inflater);
		View titleCenterView = headerViewFactory.getTitleCenterView();
		fgHeader.setCenterView(titleCenterView);
		TextView tvTitle = (TextView) titleCenterView.findViewById(R.id.tv_header_center);
		tvTitle.setText(title);
	}
}